1. Field of the Invention
The present invention generally relates to a method of and apparatus for interfacing peripheral devices to different computing system hardware implementations and, more particularly, to an apparatus that enables peripheral devices to work on a variety of computing system hardware platforms using standard software drivers by abstracting register sets of similar but potentially incompatible peripheral devices to a common register set.
2. Description of the Related Art
Communication between a computing system and a peripheral device has long required compatibility between a software driver and the register set of the peripheral device. To support peripheral devices, a computing system has provided multiple software drivers to ensure that each device register set is matched to a compatible software driver. Certain peripheral devices, which are similar in setup parameter requirements, have incompatible register interfaces so as to require different software drivers. Since even related peripheral devices commonly have incompatible register sets, providing a single software driver has not been an option for computing systems supporting multiple peripheral devices. Likewise, a standard input/output interface between software drivers and peripheral devices has not been possible due to register set compatibility requirements. Because of register set compatibility concerns, adding a new peripheral device to a computing system has typically required adding a new software driver, even though the new software driver likely duplicates some of the code found in the supported software drivers. Computing systems have been unable to leverage their supported software drivers to provide driver support for similar but potentially incompatible peripheral devices.
Briefly, in accordance with the present invention, an operating system running on a computing system employs a unicode driver to access and control peripheral devices. For the purposes of the present invention, a unicode is an abstraction of typical commands and status messages that are employed by similar but potentially incompatible peripheral devices. A unicode driver, an abstraction of multiple device drivers, generates command unicodes to and interprets status unicodes from the peripheral devices. The method and apparatus according to the present invention enable an operating system to communicate with multiple peripheral devices by use of a standardized input/output interface. Many device drivers contain duplicate code because a portion of their functions are identical. The duplication of driver code is even more pronounced among peripheral devices of a similar type. The method and apparatus according to the present invention abstract similar but potentially incompatible peripheral devices into xe2x80x9cdevice classesxe2x80x9d and enable the creation of unicode drivers that eliminate duplicate driver code and simplify the configuration of a computing system. This removes the need for a separate device driver for each peripheral device in a computing system, thus reducing programming effort. New peripheral devices of a similar device type can be added to a computing system without adding device drivers and, as is necessary in some operating systems such as UNIX, without rebuilding the operating system.
The unicode driver or the operating system generates a command unicode for transmission to a peripheral device. The command unicode is passed by the unicode driver to a device configuration interface. The device configuration interface determines the appropriate target peripheral device for the command unicode and routes the command unicode to a command decoder within the target peripheral device. The selected command decoder then maps the data of the command unicode stored in master registers to the appropriate registers of the target peripheral device. The command decoder basically converts the command unicode to a device-specific instruction that the target peripheral device can process. Device-specific status information from the target peripheral device is converted into a status unicode, preferably an understandable ASCII text string, by the command decoder and is transmitted to the unicode driver or operating system either directly or through the device configuration interface.
New peripheral devices for a computing system that are similar to supported peripheral devices can be supported by sending a human-readable ASCII text string to the device configuration interface through a configuration port. The ASCII text string represents configuration parameters of the new device and is written to the configuration port and interpreted by the configuration decoder of the device configuration interface. The configuration decoder maps the ASCII text string to a device class, determines whether the device class corresponds to a new or existing unicode driver and updates the device configuration interface so that the unicodes are routed to the appropriate device. If necessary, a new unicode driver is loaded into the computing system prior to updating the device configuration interface.